#ifndef PERSISTER_H
#define PERSISTER_H

#define FILE_MODE_STR       0
#define FILE_MODE_BIN       1

typedef struct persister_s persister_t; 

void persister_destroy(persister_t * persister);
persister_t * persister_create(const char * path);
persister_t * persister_create_with_mode(const char * path, int mode);

int persister_load(persister_t * persister, unsigned long long * seq_no);
int persister_save(persister_t * persister, unsigned long long seq_no);

#endif /* PERSISTER_H */
